﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using HZH_Controls.Controls;
using Petroleum.UC.Public;
using Petroleum.Model;
using Petroleum.Tool;

namespace Petroleum.UC
{
    public partial class StepADrillingTeamSelect : UserControl
    {
        FormMain main = new FormMain();
        public StepADrillingTeamSelect(FormMain main)
        {
            InitializeComponent();
            this.main = main;
            List<KeyValuePair<string, string>> lstCom = new List<KeyValuePair<string, string>>()
            {
                new KeyValuePair<string, string>("GW215","GW215"),
                new KeyValuePair<string, string>("GW216","GW216"),
                new KeyValuePair<string, string>("GW226","GW226"),
                new KeyValuePair<string, string>("GW227","GW227"),
                new KeyValuePair<string, string>("GW228","GW228"),
            };
            cmdDrillingTeam.Source = lstCom;
            cmdDrillingTeam.SelectedIndex = 0;
          
        }
      
        private void cmdDrillingTeam_SelectedChangedEvent(object sender, EventArgs e)
        {
            string teamString = cmdDrillingTeam.SelectedValue;
            switch (teamString)
            {
                case "GW215":
                    Session.Team = AppConfig.TeamWordUrl + "GW215.docx";
                    this.img.Image = Properties.Resources.GW215;
                    break;
                case "GW216":
                    Session.Team = AppConfig.TeamWordUrl + "GW216.docx";
                    this.img.Image = Properties.Resources.GW216;
                    break;
                case "GW226":
                    Session.Team = AppConfig.TeamWordUrl + "GW226.docx";
                    this.img.Image = Properties.Resources.GW226;
                    break;
                case "GW227":
                    Session.Team = AppConfig.TeamWordUrl + "GW227.docx";
                    this.img.Image = global::Petroleum.Properties.Resources.GW227;
                    break;
                case "GW228":
                    Session.Team = AppConfig.TeamWordUrl + "GW228.docx";
                    this.img.Image = global::Petroleum.Properties.Resources.GW228;
                    break;
                default:
                    HZH_Controls.Forms.FrmTips.ShowTipsSuccess(this.FindForm(), "选择有误");
                    break;
            }
        }
        private void ucBtnExt1_BtnClick(object sender, EventArgs e)
        {
            main.AddControl(new DocumensRequirementSelect(main));
        }
        private void ucBtnExt2_BtnClick(object sender, EventArgs e)
        {
            main.AddControl(new Step5(main));
        }
    }
}
